<div class="row">
	<div class="col-md-12">
		<form id="editForm" class="form-horizontal" action="${request.contextPath}/cms/tag/update" method="post" onsubmit="return false">
			<input type="hidden" id="id" name="id" value="${cmsAd.id}">
			<div class="box-body">
				<div class="form-group">
					<label id="tagNameLabel" for="tagName" class="col-sm-2 control-label">名称</label>
					<div class="col-sm-4">
						<input type="text" class="form-control" name="name" id="tagName" value="${cmsTag.name}" placeholder="输入名称...">
					</div>
				</div>

				<div class="form-group">
					<label id="tagWhetherNewLabel" for="tagWhetherNew" class="col-sm-2 control-label">是否最新</label>
					<div class="col-sm-4">
						<select class="form-control" id="tagWhetherNew"  name="whetherNew" value="${cmsTag.whetherNew}" style="width: 100%;">
						</select>
					</div>
					<label id="tagWhetherHotLabel" for="tagWhetherHot" class="col-sm-2 control-label">是否最热</label>
					<div class="col-sm-4">
						<select class="form-control" id="tagWhetherHot"  name="whetherHot" value="${cmsTag.whetherHot}" style="width: 100%;">
						</select>
					</div>
				</div>
				<div class="form-group">
					<label id="tagStatusLabel" for="tagStatus" class="col-sm-2  control-label">状态</label>
					<div class="col-sm-2">
						<select class="form-control" id="tagStatus"  name="status" value="${cmsTag.status}" style="width: 100%;">
						</select>
					</div>
				</div>
				<div class="error-message text-center" id="addFormErrorMsgContainer">
					<span class="error-icon"></span>
					<span id="addFormErrorMsg" class="error-msg" ></span>
				</div>
			</div>
			<div class="box-footer">
				<div class="pull-right">
					<button type="button" class="btn btn-default btn-sm" data-dismiss="modal"><i class="fa fa-close"></i> 关闭</button>
				</div>
			</div>
		</form>
	</div>
</div>
<script type="text/javascript">

    $(function() {
		$("#tagStatus").select2({
			data: StatusStore,
			theme: "bootstrap",
			minimumResultsForSearch: Infinity
		}).val('${cmsTag.status}').trigger("change");

		$("#tagWhetherHot").select2({
			data: WhetherStore,
			theme: "bootstrap",
			minimumResultsForSearch: Infinity
		}).val('${cmsTag.whetherHot}').trigger("change");

		var $tagWhetherNew = $("#tagWhetherNew");
		$tagWhetherNew.select2({
			data: WhetherStore,
			theme: "bootstrap",
			minimumResultsForSearch: Infinity
		}).val('${cmsTag.whetherNew}').trigger("change");


	});
</script>